TARGET=MapTest
OBJS=main.o MapApp.o

CC=/usr/local/bin/arm-apple-darwin-gcc
CXX=/usr/local/bin/arm-apple-darwin-g++
LD=$(CC)
CFLAGS=-fsigned-char
LDFLAGS=-lobjc -ObjC -mmacosx-version-min=10.1 -framework CoreFoundation -framework Foundation -framework UIKit -framework LayerKit -framework CoreGraphics -framework GraphicsServices -framework Celestial -framework MusicLibrary

all:	$(TARGET)

$(TARGET):	$(OBJS)
	$(LD) $(LDFLAGS) -o $@ $^

%.o:	%.m
	$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@

clean:
	rm -Rf $(OBJS) $(TARGET) $(TARGET).app

package:	all
	rm -Rf $(TARGET).app
	mkdir -p $(TARGET).app
	cp $(TARGET) $(TARGET).app
	cp -r Resources/* $(TARGET).app

install:	package
	scp -r $(TARGET).app root@10.0.1.3:/Applications